﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace Com.CMS263.Util
{
    public class RegexUtil
    {
        /// <summary>
        /// 得到所有符合匹配标准的标签
        /// </summary>
        /// <param name="pattern">匹配正则表达式</param>
        /// <param name="content">要查找的内容</param>
        /// <returns></returns>
        public static MatchCollection GetTages(string pattern,string content)
        {
            Regex regex = new Regex(pattern, RegexOptions.Multiline | RegexOptions.IgnoreCase);
            MatchCollection mc = regex.Matches(content);
            foreach (Match m in mc)
            {
                
                Console.Write(m.Value);
            }
            return mc;
        }
    }
}
